<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos  -->
			<title>Docs For Class ChartManager</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
						<script src="../media/lib/classTree.js"></script>
												<script language="javascript" type="text/javascript">
				var imgPlus = new Image();
				var imgMinus = new Image();
				imgPlus.src = "../media/images/plus.png";
				imgMinus.src = "../media/images/minus.png";
				
				function showNode(Node){
							switch(navigator.family){
								case 'nn4':
									// Nav 4.x code fork...
							var oTable = document.layers["span" + Node];
							var oImg = document.layers["img" + Node];
									break;
								case 'ie4':
									// IE 4/5 code fork...
							var oTable = document.all["span" + Node];
							var oImg = document.all["img" + Node];
									break;
								case 'gecko':
									// Standards Compliant code fork...
							var oTable = document.getElementById("span" + Node);
							var oImg = document.getElementById("img" + Node);
									break;
							}
					oImg.src = imgMinus.src;
					oTable.style.display = "block";
				}
				
				function hideNode(Node){
							switch(navigator.family){
								case 'nn4':
									// Nav 4.x code fork...
							var oTable = document.layers["span" + Node];
							var oImg = document.layers["img" + Node];
									break;
								case 'ie4':
									// IE 4/5 code fork...
							var oTable = document.all["span" + Node];
							var oImg = document.all["img" + Node];
									break;
								case 'gecko':
									// Standards Compliant code fork...
							var oTable = document.getElementById("span" + Node);
							var oImg = document.getElementById("img" + Node);
									break;
							}
					oImg.src = imgPlus.src;
					oTable.style.display = "none";
				}
				
				function nodeIsVisible(Node){
							switch(navigator.family){
								case 'nn4':
									// Nav 4.x code fork...
							var oTable = document.layers["span" + Node];
									break;
								case 'ie4':
									// IE 4/5 code fork...
							var oTable = document.all["span" + Node];
									break;
								case 'gecko':
									// Standards Compliant code fork...
							var oTable = document.getElementById("span" + Node);
									break;
							}
					return (oTable && oTable.style.display == "block");
				}
				
				function toggleNodeVisibility(Node){
					if (nodeIsVisible(Node)){
						hideNode(Node);
					}else{
						showNode(Node);
					}
				}
			</script>
					</head>
		<body>
			<div class="page-body">			
<h2 class="class-name"><img src="../media/images/Class_logo.png"
														alt=" Class"
														title=" Class"
														style="vertical-align: middle"> ChartManager</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The ChartManager manages all charts that will be displayed on the page.</p>
<p class="description"><p>The ChartManager is responsible for the generation of the correct header-code  that has to be inserte into the page's &lt;head&gt; element. The purpose  of this code is to contact the Google server to fetch all required, external  JavaScript code used to render the charts. It also contains code, that will  assign the data and options to the charts and to create the chart themselfs.</p></p>
		<p class="notes">
			Located in <a class="field" href="_googlecharttools---view---ChartManager.class.php.html">/googlecharttools/view/ChartManager.class.php</a> (line <span class="field">40</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>




	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
												<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																							
				<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#addChart" title="details" class="method-name">addChart</a>
											(<span class="var-type"><a href="../view/Chart.html">Chart</a></span>&nbsp;<span class="var-name">$chart</span>)
									</div>
															
				<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#addOnLoadJavaScriptCodeBegin" title="details" class="method-name">addOnLoadJavaScriptCodeBegin</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$code</span>)
									</div>
															
				<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#addOnLoadJavaScriptCodeEnd" title="details" class="method-name">addOnLoadJavaScriptCodeEnd</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$code</span>)
									</div>
															
				<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">string</span>
										<a href="#getHtmlHeaderCode" title="details" class="method-name">getHtmlHeaderCode</a>
											([<span class="var-type">boolean</span>&nbsp;<span class="var-name">$loadJsapi</span> = <span class="var-default">true</span>])
									</div>
															
				<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">string</span>
										<a href="#getJavaScriptCode" title="details" class="method-name">getJavaScriptCode</a>
										()
									</div>
											</div>
		</div>
	</div>		

	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="methodaddChart" id="addChart"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">addChart</span> (line <span class="line-number">62</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Adds another chart to the manager.</p>
<p class="description"><p>All charts that should be displayed on the page have to be added to the manager.  Please make sure, that all chart have their own, unique ID. If a chart is added  having the same ID as a chart that has been added before, the &quot;older&quot; chart will be  overwritten.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			addChart
		</span>
					(<span class="var-type"><a href="../view/Chart.html">Chart</a></span>&nbsp;<span class="var-name">$chart</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"><a href="../view/Chart.html">Chart</a></span>
				<span class="var-name">$chart</span><span class="var-description">: Chart, that will be displayed on the page.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodaddOnLoadJavaScriptCodeBegin" id="addOnLoadJavaScriptCodeBegin"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">addOnLoadJavaScriptCodeBegin</span> (line <span class="line-number">73</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Adds additional code at the beginning of the generated JavaScript  onLoad-function.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			addOnLoadJavaScriptCodeBegin
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$code</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$code</span><span class="var-description">: Additonal JavaScript code.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodaddOnLoadJavaScriptCodeEnd" id="addOnLoadJavaScriptCodeEnd"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">addOnLoadJavaScriptCodeEnd</span> (line <span class="line-number">84</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Adds additional code at the end of the generated JavaScript  onLoad-function.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			addOnLoadJavaScriptCodeEnd
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$code</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$code</span><span class="var-description">: Additonal JavaScript code.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetHtmlHeaderCode" id="getHtmlHeaderCode"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">getHtmlHeaderCode</span> (line <span class="line-number">170</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Encapsulates the code generated by getJavaScriptCode() in a valid HTML-code.</p>
<p class="description"><p>The generated code is encapsulated in a &lt;script&gt; element.</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> The generated HTML-/JavaScript code. This can be directly               included in the HTML-page's &lt;head&gt; element.</li>
				<li><span class="field">throws:</span> CodeGenerationException               Thrown, if the JavaScript code coudn't be generated, because               no data (<a href="../view/Chart.html#methodsetData">Chart::setData()</a>) has been assigned to at               least one chart.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			getHtmlHeaderCode
		</span>
					([<span class="var-type">boolean</span>&nbsp;<span class="var-name">$loadJsapi</span> = <span class="var-default">true</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">boolean</span>
				<span class="var-name">$loadJsapi</span><span class="var-description">: If set to true, a &lt;script&gt; element that loads Google's               JSAPI will be included in the first code-line, too.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetJavaScriptCode" id="getJavaScriptCode"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">getJavaScriptCode</span> (line <span class="line-number">105</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Genarates the JavaScript code that will prepare all charts.</p>
<p class="description"><p>This method will generate a preparation JavaScript-function for all charts  that have been added. This functions assign the chart's data, options and the  charts themselve to a global variable.  The generated code doesn't contain the required code to load the  packages from Google's server but a callback function that prepares and  displayes all charts automatically as soon as all packages have been loaded.</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> The generated JavaScript code.</li>
				<li><span class="field">throws:</span> CodeGenerationException               Thrown, if the JavaScript code coudn't be generated, because               no data (<a href="../view/Chart.html#methodsetData">Chart::setData()</a>) has been assigned to at               least one chart.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			getJavaScriptCode
		</span>
				()
			</div>
	
		
			
	</div>
						
		</div>
	</div>

	
	<p class="notes" id="credit">
		Documentation generated on Mon, 01 Oct 2012 16:45:03 +0200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.4</a>
	</p>
	</div></body>
</html>